﻿using Castle.DynamicProxy;

namespace OOP.AOP.lib.Factory
{
    public static class AopProxyFactory
    {
        private static readonly ProxyGenerator _generator = new ProxyGenerator();

        public static T CreateProxy<T>(T target, params IInterceptor[] interceptors) where T : class
        {
            return _generator.CreateInterfaceProxyWithTargetInterface(target, interceptors);
        }
    }
}
